<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class user extends CI_Model {

	function __construct()
	{
		parent::__construct();
	}
	
	function insert($data){
		$this->db->insert('user',$data);
	}	
	
	function delete($id){
		$this->db->where('iduser', $id);
		$this->db->delete('user');
	}
	
	function selectone($id){
		$this->db->select('*');
		$this->db->from('user');
		$this->db->where('iduser',$id);
		$query = $this->db->get();
		return $query;
	}
	
	function get_list(){
        $this->db->select('*');
        $this->db->from('user');
        $this->db->where('iduser !=','1');
        $query = $this->db->get();
        return $query->result_array();
    }
        
	function get_user() {
		$this->db->select('*');
		$this->db->from('user');
		$query = $this->db->get();
		return $query;
	}
	
}

?>